package io.peng.service;

import io.peng.dao.AccountDAO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * Created by eric on 16/3/20.
 */

@Service
public class AccountService {

    private AccountDAO accountDao;

    @Autowired
    public AccountService(AccountDAO dao) {
        this.accountDao = dao;
    }

    public void transfer(int amount, String from, String to) {
        accountDao.transfer(amount, from, to);
    }

    public void save(int amount, String name) {
        accountDao.save(amount, name);
    }
}
